#ifndef _UFL_Global_Environment_Type_H_
#define _UFL_Global_Environment_Type_H_

struct GLFWwindow;

#include "UFLTimer.h"
#include "UFLInputSystem.h"
#include "UFLRenderer.h"

namespace ufl
{
	class UFLGlobalEnvironment
	{
	public:
		~UFLGlobalEnvironment();

	public:
		static UFLGlobalEnvironment* getEnvironment();
		static void destroyEnvironment();

		UFLRenderer* getRenderer() const;
		UFLInputSystem* getInputSys() const;
		UFLTimer* getTimer() const;

	private:
		UFLGlobalEnvironment();

	private:
		static UFLGlobalEnvironment* _env;

		UFLRenderer* _renderer;
		UFLInputSystem* _inputSys;
		UFLTimer* _timer;
	};

	void frameBufferSizeCallback(GLFWwindow* window, int width, int height);
	void keyCallback(GLFWwindow* window, int key, int scancode, int action, int mods);
	void mouseEnterCallback(GLFWwindow* window, int entered);
	void mouseButtonCallback(GLFWwindow* window, int button, int action, int mods);
	void mousePosCallback(GLFWwindow* window, double xPos, double yPos);
}

#endif